#!/usr/bin/perl
require "pdcusrgroup-lib.pl";

&ReadParse();
my ($is_ping, $username, $password, $error_msg);

$username = $in{"dm_username"};
$password = $in{"dm_password"};

unless($username)
{
	$error_msg = $text{"error_msg_nousername"};
	&error($error_msg);
}

$out = &ez_system(split(/\s/, $config{'winbind_store_passwd'}), "$username"."\%"."$password");

#$out = `$config{'winbind_store_passwd'} $username\%$password 2>/dev/null`;

#&winbind_restart();

#system("$config{'winbind_info_user'} > $config{'pdcuserfile'}");
#system("$config{'winbind_info_group'} > $config{'pdcgroupfile'}");

#$out = &ez_system($config{'winbind_stop'})

$out = `$config{'winbind_stop'} 2>/dev/null`;
#&checkpdcfile();
sleep(3);

&redirect("refreshtable.cgi");
